

import {createRouter, createWebHistory} from 'vue-router'

const routes = [
    {
        path: "/",
        component: () => import('../components/pages/Login.vue')
    },
    /* 社区页面路由 */
    {
        path: "/index",
        name: "IndexFrame",
        component: ()=> import('../components/pages/IndexFrame.vue'),
        children: [
            {
                path: "",
                name: "defaultIn",
                components: {
                    // default: () => import('../components/pages/ManageFrame.vue'),
                    IndexIn: () => import('../components/pages/front/IndexContent.vue')
                }
            },
            {
                path:"/postWeb",
                name: "postListWeb",
                components: {
                    IndexIn: ()=> import('../components/pages/front/PostWeb.vue')
                }
            },
            {
                path:"/postDetailWeb/:id",
                name: "postDetailWeb",
                components: {
                    IndexIn: () => import('../components/pages/front/PostDetailWeb.vue')
                }
            },
            {
                path:"/postEdit",
                name: "postEdit",
                components: {
                    IndexIn: () => import('../components/pages/front/PostEdit.vue')
                }
            },
            {
                path:"/activityWeb",
                name: "activityListWeb",
                components: {
                    // IndexIn: ()=> import('../components/pages/front/ActivityWeb.vue')
                    IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/activityDetailWeb/:id",
                name: "activityDetailWeb",
                components: {
                    // IndexIn: () => import('../components/pages/front/ActivityDetailWeb.vue')
                    IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/activityEdit",
                name: "activityEdit",
                components: {
                    // IndexIn: () => import('../components/pages/front/ActivityEdit.vue')
                    IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/commodityWeb",
                name: "commodityListWeb",
                components: {
                    IndexIn: ()=> import('../components/pages/front/CommodityWeb.vue')
                    // IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/commodityDetailWeb/:id",
                name: "commodityDetailWeb",
                components: {
                    IndexIn: () => import('../components/pages/front/CommodityDetailWeb.vue')
                    // IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/commodityEdit",
                name: "commodityEdit",
                components: {
                    // IndexIn: () => import('../components/pages/front/CommodityEdit.vue')
                    IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/gameWeb",
                name: "gameListWeb",
                components: {
                    IndexIn: ()=> import('../components/pages/front/GameWeb.vue')
                    // IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            },
            {
                path:"/gameDetailWeb/:id",
                name: "gameDetailWeb",
                components: {
                    IndexIn: () => import('../components/pages/front/GameDetailWeb.vue')
                    // IndexIn: ()=> import('../components/pages/BuildingWeb.vue')
                }
            }
        ]
    },
    /* 后台管理路由 */
    {
        path:"/manage",
        name: "ManageFrame",
        component: ()=> import('../components/pages/ManageFrame.vue'),

        children: [
            {
                path: "",
                name: "defaultMa",
                components: {
                    // default: () => import('../components/pages/ManageFrame.vue'),
                    ManageIn: () => import('../components/pages/backend/NoneBack.vue')
                }
            },
            {
                path:"/userBack",
                name: "userList",
                components: {
                    ManageIn: ()=> import('../components/pages/backend/UserBack.vue')
                }
            },
            {
                path:"/userDetailBack/:id",
                name: "userDetail",
                components: {
                    ManageIn: () => import('../components/pages/backend/UserDetailBack.vue')
                }
            },
            {
                path:"/postBack",
                name: "postList",
                components: {
                    // default: () => import('../components/pages/ManageFrame.vue'),
                    // default: () => import('../components/pages/backend/PostBack.vue'),
                    ManageIn: ()=> import('../components/pages/backend/PostBack.vue')
                }
            },
            {
                path:"/postDetailBack/:id",
                name: "postDetail",
                components: {
                    // default: () => import('../components/pages/ManageFrame.vue'),
                    ManageIn: () => import('../components/pages/backend/PostDetailBack.vue')
                }
            },
            {
                path:"/gameBack",
                name: "gameList",
                components: {
                    ManageIn: ()=> import('../components/pages/backend/GameBack.vue')
                }
            },
            {
                path:"/gameDetailBack/:id",
                name: "gameDetail",
                components: {
                    ManageIn: () => import('../components/pages/backend/GameDetailBack.vue')
                }
            },
            {
                path:"/orderBack",
                name: "orderList",
                components: {
                    ManageIn: ()=> import('../components/pages/backend/OrderBack.vue')
                }
            },
            {
                path:"/orderDetailBack/:id",
                name: "orderDetail",
                components: {
                    ManageIn: () => import('../components/pages/backend/OrderDetailBack.vue')
                }
            },
            {
                path:"/activityBack",
                name: "activityList",
                components: {
                    ManageIn: ()=> import('../components/pages/backend/ActivityBack.vue')
                }
            },
            {
                path:"/activityDetailBack/:id",
                name: "activityDetail",
                components: {
                    ManageIn: () => import('../components/pages/backend/ActivityDetailBack.vue')
                }
            },
            {
                path:"/communityBack",
                name: "communityList",
                components: {
                    // ManageIn: ()=> import('../components/pages/backend/CommunityBack.vue')
                    ManageIn: ()=> import('../components/pages/Building.vue')
                }
            },
            {
                path:"/communityDetailBack/:id",
                name: "communityDetail",
                components: {
                    ManageIn: () => import('../components/pages/backend/CommunityDetailBack.vue')
                }
            }
        ]

    }

    // ,
    // {
    //     path:"/postListBack",
    //     name: "",
    //     components: {
    //         Frame: ()=> import('../components/pages/ManageFrame.vue'),
    //         ManageIn: ()=> import('../components/pages/backend/PostBack.vue'),
    //         // IndexIn: ()=> null
    //     }
    // },
    // {
    //     path:"/postDetailBack",
    //     name: "ddd",
    //     components: {
    //         Frame: () => import('../components/pages/ManageFrame.vue'),
    //         ManageIn: () => import('../components/pages/backend/PostDetailBack.vue'),
    //         // IndexIn: () => null
    //     }
    // }
    // {
    //     path:"/postListWeb",
    //     name: "",
    //     component: ()=> import('../components/pages/ManageFrame.vue')
    // },
    // {
    //     path:"/postDetailWeb/:id",
    //     name: "",
    //     component: ()=> import('../components/pages/ManageFrame.vue')
    // }
    // 模板
    // ,
    // {
    //     path:"/",
    //     name: "",
    //     component: ()=> import('../components/pages')
    // }

]



const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router




